<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOilcardTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('oilcard', function (Blueprint $table) {
            $table->increments('id');
            $table->string("card",30)->default('')->comment("油卡卡号");
            $table->integer("type")->default(0)->comment("类型 1中石化 2中石油");
            $table->integer("user_id")->default(0)->comment("用户id");
            $table->dateTime("used_at")->comment("领取时间");
            $table->integer("used_status")->default(0)->comment("领取状态,0待领取,1已领取");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('oilcard');
    }
}
